From ab0cc7c25c1b60efd30ac31ed35d42513d61c351 Mon Sep 17 00:00:00 2001 From: oliskoli Date: Mon, 18 Jun 2007 20:14:47 +0000 Subject: [PATCH] igc: Stop writing when more than 99 points in task route. git-svn-id: http://gpsbabel.googlecode.com/svn/trunk@2831 f51c46e8-681c-474f-0cfe-069cfd0219fb --- gpsbabel/igc.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gpsbabel/igc.c b/gpsbabel/igc.c index bdb774887..94d50d0d7 100644 --- a/gpsbabel/igc.c +++ b/gpsbabel/igc.c @@ -628,6 +628,9 @@ static void wr_task_hdr(const route_head * rte) if (num_tps < 0) { fatal(MYNAME ": Too few waypoints in task route\n"); } + else if (num_tps > 99) { + fatal(MYNAME ": Too much waypoints (more than 99) in task route.\n"); + } // Gather data to write to the task identification (first) record rte_time = wpt->creation_time ? wpt->creation_time : current_time(); if (NULL == (tm = gmtime(&rte_time))) { -- 2.30.2